package com.example.demo.controller;


import com.example.demo.model.Result;
import com.example.demo.service.RoleService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/role")
@AllArgsConstructor
public class RoleController {

    private RoleService roleService;

    @GetMapping
    public Result getAll() {
        return roleService.getAllRoles();
    }
}
